Added conditions to update prototype