refactoring draw points