fixing userfileds and adding tests