added some more code fixed apply and call