it's probably better to return an int type in json