Changed implementation to fit with reality