fixing increment by one procedure