cleane up code