basic drawing function working, added comments