changed maxvel to match