added new functions: Extended with templates and new options