finished first editor prototype (terrible code though)