debugged major issue, will remove debug output