updated to implement Delegate in listeners