add replace class constant
add helper test
change chain calls