added basic magic carpet js