Tried adding wait and notify