fixed some code, started testing