prepare for submit