Added some stuff to make it dynamic