separated sprite functions out of home