Issue #3, flags for functions now working