Implemented passing data back to main controller