shift common declaration functions out of generator