initial commit, implemented stage 1.