small rewrite in defer promise
add test requirements