adding support for partial fit and adding test for partial fit