Added the sources; this is a preliminary but working version