added previous code. still missing a actual database