first version, should work but API will be changed