prettify code
add retry for trakt