move <script> tags to <head>
try writing gen function to call upvote