added changing types; fixed function plots