put more code in functions