fix key error exception; allow all fields in user info to be optional; for instance analysis, pick the data with the latest date instead of the one at the last index