remove unneeded imports
qualify some imports
better definition of helper functions (only visible locally)
problem 13
initial version problem 14