converted prototype classes to regular javascript objects