- minor fix
- optimized code