Implementing partition