code cleanup, works but sucks :D