added if else to contact/:id