added some explicit returns for procedures