added some constants and comment out debug prinlines