simplified listener handling in api