chunking not working, but basic concept in place