several updates, including a start on the match shapes functions