A better way of doing it