finished debugging issue