updated achivements api logic