many fixes, added logic about district