US stock exchanges close in green territory