handles spaces correctly now