started adding dealing functionality