merging changes from rowenaluk's branch