add function types
clean code