added funcitons to generate functions, so cool