Added source code for a few functions