Wrote basic controller code