added pub handling