Copyright (c) 2010-2012 Andrey Tarantsov