rewrote functions orginized code and updated help file