fixed planning process, added statistics