add unpacking function, check columns type