adding helper methods and rspec tests for DW integration