update home js
add tests