fixed error by deleting extra #include and made code smaller