add delegate methods for ViewController