procedures first pass implementation