added implementation of procedure.[ch]