created protocols for delegate methods