cleand up code