Implemented Elias suggestion