Initial Version by Mykola Kozlenko