fixed completion and functions