added projectile function