Rewritten the fb library