New sources. Merged with mushahid's code