removed x() method from arrow, added test for use of sample in main functinos