removed unnecessary logging and returns