added corrections to make js better