documented functions. addded more functions for instance functionality