update source.c

All functions seem to be working