Added controller code