Move to php to make more dynamic