Added addional parameter to indicate which keys to fetch from database