Adding listening code.