trying the good old synchronized blocks to see if this is the problem