Changed to strategpattern