add sample and size functions and test and add aliases