switch to pg + ui stuff