[NOT WORKING] added more logic