cleanup

removed duplicate and unused code