add upper layer and lower layer functions on canvas