added chain8, fix matlab later