Added general functions file