Added preexisting code