fixing some stuff. loks of clean up needed...