added control for impurity parameter

right now it is a fixed value, will be replaced by subroutine call in
the future.