#505 - almost done - need some QA