eliminated unnecessary function call everytime a dot was drawn, enhancing performance