refactored test and client to correctly handleslices