adding listener and get method