trying to figure out testing

more testing and figure out how it really works
fixed the errors

changed some parts of the code to get rid of the errors