working version. need to fix child controller next