added sprite code.