added parameter 'duration' which allos to specify how long phantom is kept open