added listen function
close #4