reorganized stuff and adjusted timing constants