Generalizing more functions