removed debugging, now works