working on #524, working on #499