Added self variable but not working for function call.