renamed some functions to be more meaningful; added apWithParam; added SetParam