Implemented proper fields calculation