added statment handling