made key variables booleans, improved clarity