30.07.2013 actually refactored and repaired