Big Change Coding Round 2

make it more OO and easy to create funtion