Small function changes