added several functions that where previously part of 'functions.R' in edge