A better solution without the import