fix source and delete old code