Reworked to be completely dynamic