fix bug when returning pieces
fix bug when returning pieces
improve tests for different pieces