Adding version 1 code