implemented strategy pattern in PHP+JS. Implemented decorator in JS