moved some functions into utility module
more changes