bitly rewrite
fixed comparing functions & rewrite