move child widget functions into prototype