rewrite for updated squirrel