Adding origin and output