added bunches of code