cleaned up the dirty bit