added new sprite function by trees