added python wrapper test
added swig python wrapper test
added state pattern