improved class by Tavrov, minor fixes