added catch in timestamp() for undefined params
added tests for timestamp()