changed script for doctrine