enable jquery-like chained function call