change measures on onDraw to onMeasure , remove unneccesary variables on onDraw using global ones directly