added curly brace to complete function