added proc with case