Change spaces to tabs
Add getweight function