implemented first output