change method using static to make more efficient
fix using factory method pattern