altered spec verbage slightly, included big O