small function changes