working through js
finish v1