working to fit into flotilla; testing; cleanup&refactor