modified code as per js standards