- added some conditionals
- minor changes