merged andrew's work