refactored js into sub folder