Make sure conn is passed as a parametre