changes v3

more bug fixes, ran it through the compiler