rewrite code oop-like, add fc and bg properties