added html and edited function for array