Lab6

Added EC and fix some bugs regarding negatives and count calculations