completed javascripted and ready to close #6