refactore code
Check boolean conversion
Check boolean conversion