expose returnByValue and some error reporting
getProperties implemented