added potential image as input parameter