add helpers to unmarshal and select stuff from db