adding debug statements
adding tests