added ends to all levels