code 1st pass done