added functionality for attempt checking