set path to sample data
replaced weighted pick method with more efficent variant (time and memory)