handle procedure calls