Updated code to eventually support different max offsets based on request