applied comments:
- reverted unnecessary type checks
- added representation for booleans
- removed unwanted alignment of variables