added Aristeidis version with locks