minor changes code seems to work fine now