changed code model from boolean to number