modified to run just with jquery but without dm4c