Edited the code a little bit, Fixed an error in one of the mode's when adding.