Added all pre-existing code