clearned up code.