implemented callback(on windows), changed api