Added a lot of business-logic