ported some leftover prototype code