removed explicit return undef
explicit return from functions