Updated library to work with api v1