Added common function file for balanced functions