call callback after perfecting maze