added basic listen function