remove worker and use window instead of self