update with tests