removed unnecessary log and function declaration