simplified the code base