protocol functions moved to their own source files