formatting and fixed so it will only draw in drawmode