implement suggestions from shoyer