minor function changes