02 - refactored JS