refactored in JS also