added optional parameters (does not work!)
added Input for Map objects