Added support for multiple arguments extend. Close #246