integrate GUI with database