updated code for latest production/staging server
updating for full file structure