created functions for output