Merged common functions