really simplified the code.