added elias" code and will delete old code when verify it works