metis code, still commented out