completion function. changed message types for completion
merged files