moved enviromnet from dev to test and updated code to reflect database
and schema changes