semiworking
added function for fields