implement second pass (read from DB)