finished controller file