don't hardcode size check
fix tab (only read if > 0)