Improves in drawing function