started working on javascript model stuff