wrote first procedure