more progress on javascript coding style