working on javascript library