extend and defaults functions