Code for hasp project