Made syntax simpler
returned 0/1 instead of false/true