started writing sample fn