Updated Sprite Control Function