added imaging code