cross platform working impl

.