bugfix. new was not working because of bad pattern matching