this is a homework of one of my courses