reverted to flask for socket integration