merging with andrew's branch