fixed parameter passing for a few functions