Changed static to dynamic
refactor