Completed version 1

ready to debug...