finished implementation
index out of bounds being thrown at progtest