changed to OOP-style js with prototypes n shit