changed to send three parameters