calling functions working within ViewDidLoad