moved some stuff from base to util.py, also changed how  works on fields