added function to extend