Updated to make code concise.