refactored listener and status