Even your suboptimal behaviors have a function. Understanding what they are can help you make a change.