Added more code for calculating traders