tested and stable commit. input handling up next