updated after James' feedback