reworked database to actually store images