Adding function on draw page