Added Some Basic Logic