Added a few functions to source code