added substitution + final test