added sprit functionality