[NOT WORKING] added some logic