rename function name resposeX to onX, and implement init functions