completed basic function before the Ajax style