adding new implementation of the same code