move function type to prototype