added functionality and spec