started work on a more sophisticated alarm script