changed small implementation