implemented partition