added example usage of partitioner and fixed tiny bug