updated for post on SO