cleaned a bit of code