Now properly stores all data, preliminary sorting