Implementation of Controller