updated code for parsing forex