added more functions for inserting application