added type debug
added negative test