added new method to sprite factory