Need to add some exception handling