define field with type
fix redifine methods bug