The w function isn't working still. Figure out the bug please.