implemented protocols for passing data between views