to incorporate most recent changes

@linqui's changes