Modified Source to be more generic