using prepared statement to speed up insert