modify stupid retrive code