working version with labels