add pretty formating + some database code