changes to functions for issue 104