Added all previous code