Added controller functionality