added extends where necessary