tuned comments;
tuned error message;
removed redundant parameter;
fixed bug: wasn't applying record selector. bug was introduced when generalising the containing function;