done assignment5 w/o EC