cleanup
fix incorrect implementation