put all the function in draw