modified js structure