set which function get called in go routines