fixed a lot of stupidness on my part