added a few things on javascript