Principles of electricity and magnetism