added 'state' pattern
Merge remote-tracking branch 'origin/master'