Updated to use database to handle getting what we want.