Implemented get and set for fields