added function to retrieve sprite state