working with remove_singletons.r