modify sprite and fixed classes for sprite functionality