added train detection attribute and nicks blocks