Updated with a working option with listeners