flush out 2 functions; still awaiting comments and testing
comments and cleanup