first commit, code from the magazine as a start