Creating span wrapper in better way