fix some issues, add first version of as.xts() function