Add extend functionality and buildParams method