Added tests and implementations