made js object orienented