created flexible controllers using repositories