Moving function called by get to top level instead of being annonymous