move action code into handler files