code improved
boolean written as 0s and 1s