Added a lot of functionality for deal()