added header and changed names to protect internal procedures