make JS OOPed