updated model for more flexibility in search an update