added the handleTrade function

should work as intended, but probably will not. please assign me
whatever github issues arise and i'll fix them tonight.