bug discovered certain types of functions wo't return
added tests