@schafik's work; removed merge conflicts, step 1