optimized few methods; improved code readability