added some sweet JS stuff