Added functions for E and B field