Added basic functionality with tests