Modify units function to accept a base set.