added underscore
finished JS functionality