added method to dynamically generate sprites