Updated preprocessing