simplified some parts of the code