fixed index regexp and improved code style