fn to return as dict