adding retrieve function to the manager and repository