added implementation for basic operations