added some output to see whats going wrong
fixed some memory stuff, outputs better
fixed some memory issues and it outputs better