function for near field mimo