Slight code change to API