revised js for practice