small changes in implementation of sprites