before refarctor