avoiding unnecessary mongo queries and fixing routes constraints