Update to be more efficient