adding extend function and options for settings