Controller implementation