this will not work
refactored to sockets