Added tests and unfolded versions