Finally got a working model