some updates in routes and check if is a socket