modified simple controller