made many fixes to things