How and when to take ranitidine