need to fix data handeling (read chunks)