Added comments to make the code more readable and added the red bg functionality