allocation algorithms changed in order to work with the JSON input. Still verification work to be done