prepare for before casting