added everything before starting with ajax