remove unnecessary parts in the code