add type asserts in appendReturn and appendCall
remove redundant size parameters to appendReturn and appendCall