added optional extend