second method not getting value