implemented Stack class and tests