initial code write, not working yet, many syntax errors