made part of the code more simple