changed input to long vector