Updating backend to accept a window size

adding functionality to the backend so that a windowsize can be set to
chunk documents.