updating javascript post
updated module pattern post