now should be compatibile with jQuery