move index attr to collection class
apply php-cs-fixer
update readme