refactored coverfunction to not define var end twice
refactored coverfunction to not define var end twice

shaicantor/sl-node-cover,shaicantor/sl-node-cover,alonweiss-sl/sl-node-cover,alonweiss-sl/sl-node-cover,alonweiss-sl/sl-node-cover,shaicantor/sl-node-cover